package com.xbongbong.sys.model.impl;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.sys.domain.dao.MirrorInfoDao;
import com.xbongbong.sys.domain.entity.MirrorInfoEntity;
import com.xbongbong.sys.model.MirrorInfoModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 *
 * @author xingxing.xiao
 * @date 2019/11/25 17:27
 * @since v1.0
 * @version v1.0
 */
@Service("mirrorInfoModel")
public class MirrorInfoModelImpl implements MirrorInfoModel {

    @Resource
    private MirrorInfoDao mirrorInfoDao;

    @Override
    public Integer insert(MirrorInfoEntity entity) {
        return mirrorInfoDao.insert(entity);
    }

    @Override
    public Integer update(MirrorInfoEntity entity) throws XbbException {
        return mirrorInfoDao.update(entity);
    }

    /**
     * 查询实体列表
     *
     * @param param 条件
     * @author xingxing.xiao
     * @date 2019/11/25 17:16
     */
    @Override
    public List<MirrorInfoEntity> findEntitys(Map<String, Object> param) {
        return mirrorInfoDao.findEntitys(param);
    }

    /**
     * 获取符合查询条件的记录总数
     *
     * @param param 条件
     * @author xingxing.xiao
     * @date 2019/11/25 17:33
     */
    @Override
    public Integer getEntitysCount(Map<String, Object> param) {
        return mirrorInfoDao.getEntitysCount(param);
    }

    @Override
    public List findEntitysWithoutSub(Map<String, Object> param) {
        return null;
    }

    /**
     * 获取模块实体
     * @author xingxing.xiao
     * @date 2019/11/25 17:17
     */
    @Override
    public MirrorInfoEntity getMirrorModule(Map<String, Object> param) {
        return mirrorInfoDao.getMirrorModule(param);
    }
}
